Optimal. Leaf size=37 \[ \frac{a^2 \log (\sin (c+d x))}{d}+\frac{a^2 \log (\cos (c+d x))}{d}+2 i a^2 x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0390279, antiderivative size = 37, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.091, Rules used = {3541, 3475} \[ \frac{a^2 \log (\sin (c+d x))}{d}+\frac{a^2 \log (\cos (c+d x))}{d}+2 i a^2 x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3541
Rule 3475
Rubi steps
\begin{align*} \int \cot (c+d x) (a+i a \tan (c+d x))^2 \, dx &=2 i a^2 x+a^2 \int \cot (c+d x) \, dx-a^2 \int \tan (c+d x) \, dx\\ &=2 i a^2 x+\frac{a^2 \log (\cos (c+d x))}{d}+\frac{a^2 \log (\sin (c+d x))}{d}\\ \end{align*}
Mathematica [A] time = 0.0382218, size = 30, normalized size = 0.81 \[ \frac{a^2 (\log (\tan (c+d x))+2 \log (\cos (c+d x))+2 i d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.046, size = 47, normalized size = 1.3 \begin{align*} 2\,i{a}^{2}x+{\frac{2\,i{a}^{2}c}{d}}+{\frac{{a}^{2}\ln \left ( \cos \left ( dx+c \right ) \right ) }{d}}+{\frac{{a}^{2}\ln \left ( \sin \left ( dx+c \right ) \right ) }{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 2.01946, size = 57, normalized size = 1.54 \begin{align*} \frac{2 i \,{\left (d x + c\right )} a^{2} - a^{2} \log \left (\tan \left (d x + c\right )^{2} + 1\right ) + a^{2} \log \left (\tan \left (d x + c\right )\right )}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.17877, size = 49, normalized size = 1.32 \begin{align*} \frac{a^{2} \log \left (e^{\left (4 i \, d x + 4 i \, c\right )} - 1\right )}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.941224, size = 22, normalized size = 0.59 \begin{align*} \frac{a^{2} \log{\left (e^{4 i d x} - e^{- 4 i c} \right )}}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.30354, size = 101, normalized size = 2.73 \begin{align*} -\frac{4 \, a^{2} \log \left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + i\right ) - a^{2} \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1 \right |}\right ) - a^{2} \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1 \right |}\right ) - a^{2} \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) \right |}\right )}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]